package guestbook;

import java.util.Date;

import javax.jdo.annotations.*;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.users.User;

@PersistenceCapable
public class Greeting {
	@PrimaryKey
	@Persistent( valueStrategy = IdGeneratorStrategy.IDENTITY )
	private Key key;
	
	@Persistent
	private User user;
	
	@Persistent
	private String content;
	
	@Persistent
	private Date date;
	
	public Greeting( User author, String content, Date date ) {
		this.user = author;
		this.content = content;
		this.date = date;
	}

	public Key getKey() {
		return key;
	}
	public User getUser() {
		return user;
	}
	public String getContent() {
		return content;
	}
	public Date getDate() {
		return date;
	}

	public void setKey( Key key ) {
		this.key = key;
	}
	public void setUser( User user ) {
		this.user = user;
	}
	public void setContent( String content ) {
		this.content = content;
	}
	public void setDate( Date date ) {
		this.date = date;
	}
	
}